package com.ysx.student.zhangqingrong.com.ysx;

/**
 * @author 张青荣
 */
public class Demo2 {

    public static void main(String[] args) {

        // 定义一个变量，分别求出：
        int i = 123;
        System.out.println(i / 100);
        System.out.println(i / 10 % 10);
        System.out.println(i % 10);

        getCount();
        extracted();
        demoGetNum(1, 2);
        demoGetNuc(1, 2);
    }

    private static void getCount() {
        int b = 1;
        int c = 2;
        int sum = b + c;
        System.out.println(sum);
    }

    private static int extracted() {
        int b = 1;
        int c = 2;
        int sum = b + c;
        return sum;
    }

    private static int demoGetNum(int b, int c) {

        int sum = b + c;
        return sum;
    }

    private static void demoGetNuc(int b, int c) {
        int sum = b + c;
        System.out.println(sum);

    }
}
